import { TOKEN_KEY } from '@/constants'
import Cookies from 'js-cookie'
export const getToken = () => {
  return Cookies.get(TOKEN_KEY)
}

export const setUserToken = (token: string) => {
  Cookies.set(TOKEN_KEY, token,{
    // 设置7天过期
    expires:7
  })
}

export const removeToken = () => {
  Cookies.remove(TOKEN_KEY)
}
